package com.itheima.tlias84.Po;

import com.itheima.tlias84.entity.Expr;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

@Data
public class UpdateEmpParam {
    private int id;
    @NotNull(message="用户名不能为空")
    @Length(min=2,max=20,message="用户名长度为[2,20]")
    private String username;
    @NotNull(message="姓名不能为空")
    @Length (min=2,max=20,message="姓名长度为[2,20]")
    private String name;
    @Length (min=11,message="手机号长度必须是11位")
    @Pattern(regexp="^1[3-9]\\d{9}$",message="手机号格式不正确")
    private String phone;
    private int gender;
    private Integer job;
    private String image;
    private LocalDate entryDate;
    private Integer deptId;
    private Integer salary;
    private LocalDateTime updateTime;
    private LocalDateTime createTime;

    //工作经历
    private List<Expr> exprList;
}
